/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package action;

import controller.Action;
import core.App;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import model.Usuario;

/**
 *
 * @author Daniel
 */
public class usuario implements Action{

    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException {
       
        List<usuario> usuarios = App.getInstance().getSession().createQuery("from Usuario").list();
        App.getInstance().setAttribute("usuarios", usuarios);
        
        response.sendRedirect("usuario.jsp");
    }
    
}
